<div class="property-filter widget">
	<div class="content">
		<form method="get" action="?" class="form-search-box">
          	<?php if($list_type == "land") { ?>
          	<div class="w-box-search-form w-box-search-form-header">
            	<h5>FOR LAND SALE</h5>
          	</div>
          	<input type="hidden" name="list_type" value="land" />
          	<div class="location control-group">
				<label class="control-label" id="inputCity" for="inputCity"><?php echo $text_location; ?></label>
				<div class="controls city_advance_search">
					<div class="row-fluid">
						<div class="span12">
							<select id="inputLocation" name="cities" class="span12">
								<option value="" id="all-location"><?php echo $text_all; ?></option>
								<?php if(count($lkup_cities) > 0) { ?>
								<?php foreach ($lkup_cities as $city) { ?>
								<option value="<?php echo $city->City_ID; ?>" <?php if(is_array($cities) && count($cities) > 0 && in_array($city->City_ID, $cities)) {echo 'selected="selected"';} ?>><?php echo $city->Name; ?></option>
								<?php } ?>
								<?php } ?>
							</select>
						</div>
					</div>
				</div>
				<!-- /.controls -->
			</div>
			<!-- /.control-group -->
			<div class="type control-group">
				<label class="control-label" for="inputType"> <?php echo $text_zoning; ?> </label>
				<div class="controls">
					<select id="propertytype" name="propertytype" class="span12">
						<option value=""><?php echo $text_all; ?></option>
						<?php if(count($dd_zoning) > 0) { ?>
						<?php foreach ($dd_zoning as $type) { ?>
						<option value="<?php echo $type->ListingOption_ID; ?>" <?php if(isset($propertytype) && $propertytype == $type->ListingOption_ID) {echo 'selected="selected"';} ?>><?php echo $type->Name; ?></option>
						<?php } ?>
						<?php } ?>
					</select>
				</div>
			<!-- /.controls -->
			</div>
          	<?php } else { ?>
          	<div class="w-box-search-form w-box-search-form-header">
            	<h5>PROPERTIES FOR SALE</h5>
          	</div>
			<div class="sale control-group">
				<div class="controls" >
					<label class="radio" for="inputSale"> 
						<input type="radio" name="localorint" id="local" value="0"
						<?php if($localorInt == 0) {echo 'checked="checked"';} ?>>&nbsp;<?php echo $text_local; ?>
					</label>
				</div>
			<!-- /.controls -->
			</div>
			<!-- /.control-group -->
			<div class="rent control-group">
				<div class="controls">
					<label class="radio" for="inputRent"> 
               			<input type="radio" name="localorint" id="international" value="1" <?php if($localorInt == 1) {echo 'checked="checked"';} ?>>
                                &nbsp;<?php echo $text_international; ?>
					</label>
				</div>
			<!-- /.controls -->
			</div>
			<!-- /.control-group -->
		
			<div class="type control-group">
				<label class="control-label" for="inputType"> <?php echo $text_propertytype; ?> </label>
				<div class="controls">
					<select id="propertytype" name="propertytype" class="span12">
						<option value=""><?php echo $text_all_propertytype; ?></option>
						<?php if(count($dd_propertytype) > 0) { ?>
						<?php foreach ($dd_propertytype as $type) { ?>
						<option value="<?php echo $type->PropertyType_ID; ?>" <?php if(isset($propertytype) && $propertytype == $type->PropertyType_ID) {echo 'selected="selected"';} ?>><?php echo $type->Name; ?></option>
						<?php } ?>
						<?php } ?>
					</select>
				</div>
			<!-- /.controls -->
			</div>
			<!-- /.control-group -->
			<div class="location control-group">
				<label class="control-label" id="inputCity" for="inputCity">City</label>
				<div class="controls city_advance_search">
					<div class="row-fluid">
						<div class="span12">
							<select id="inputLocation" name="cities" class="span12">
								<option value="" id="all-location"><?php echo $text_all_cities; ?></option>
								<?php if(count($lkup_cities) > 0) { ?>
								<?php foreach ($lkup_cities as $city) { ?>
								<option value="<?php echo $city->City_ID; ?>" <?php if(is_array($cities) && count($cities) > 0 && in_array($city->City_ID, $cities)) {echo 'selected="selected"';} ?>><?php echo $city->Name; ?></option>
								<?php } ?>
								<?php } ?>
							</select>
						</div>
					</div>
				</div>
				<!-- /.controls -->
			</div>
			<!-- /.control-group -->
			<div class="control-group">
				<label class="control-label" for="inputBeds"> <?php echo $text_bedrooms; ?> </label>
				<div class="controls">
					<div class="row-fluid">
						<div class="span5">
							<input name="bedroom_min" value="<?php if(isset($bedroom_min)) {echo $bedroom_min;} ?>" type="text" id="bedroom_min" class="span12 bedroom_min small" placeholder="<?php echo $text_min; ?>">
						</div>
						<div class="span2">
							<label class="control-label price-lbl to-lbl" for="inputTo"><?php echo $text_to; ?></label>
						</div>
						<div class="span5 pull-right">
							<input name="bedroom_max" value="<?php if(isset($bedroom_max)) {echo $bedroom_max;} ?>" type="text" id="bedroom_max" class="span12 bedroom_max small" placeholder="<?php echo $text_max; ?>">
						</div>
					</div>
				</div>
			<!-- /.controls -->
			</div>
			<!-- /.control-group -->
		
			<div class="control-group">
				<label class="control-label" for="inputBaths"> <?php echo $text_bathrooms; ?> </label>
				<div class="controls">
					<div class="row-fluid">
						<div class="span5">
							<input name="bathroom_min" value="<?php if(isset($bathroom_min)) {echo $bathroom_min;} ?>" type="text" id="bathroom_min" class="span12 bathroom_min small" placeholder="<?php echo $text_min; ?>">
						</div>
						<div class="span2">
							<label class="control-label price-lbl to-lbl" for="inputTo"><?php echo $text_to; ?></label>
						</div>
						<div class="span5 pull-right">
							<input name="bathroom_max" value="<?php if(isset($bathroom_max)) {echo $bathroom_max;} ?>" type="text" id="bathroom_max" class="span12 bathroom_max small" placeholder="<?php echo $text_max; ?>">
						</div>
					</div>
				</div>
				<!-- /.controls -->
			</div>
			<!-- /.control-group -->
          	<div class="control-group">
				<label class="control-label" for="inputBaths"> <?php echo $text_price; ?> </label>
				<div class="controls">
					<div class="row-fluid">
						<div class="span5">
							<input name="price_min" value="<?php if(isset($price_min)) {echo $price_min;} ?>" type="text" id="price_min" class="span12 small" placeholder="<?php echo $text_min; ?>">
						</div>
						<div class="span2">
							<label class="control-label price-lbl to-lbl" for="inputTo"><?php echo $text_to; ?></label>
						</div>
						<div class="span5 pull-right">
							<input name="price_max" value="<?php if(isset($price_max)) {echo $price_max;} ?>" type="text" id="price_max" class="span12 small" placeholder="<?php echo $text_max; ?>">
						</div>
					</div>
				</div>
				<!-- /.controls -->
			</div>
			<div class="control-group">
				<label class="control-label" for="inputBaths"> <?php echo $text_size; ?> </label>
				<div class="controls">
					<div class="row-fluid">
						<div class="span5">
							<input name="size_min" value="<?php if(isset($size_min)) {echo $size_min;} ?>" type="text" id="size_min" class="span12 small" placeholder="<?php echo $text_min; ?>">
						</div>
						<div class="span2">
							<label class="control-label price-lbl to-lbl" for="inputTo"><?php echo $text_to; ?></label>
						</div>
						<div class="span5 pull-right">
							<input name="size_max" value="<?php if(isset($size_max)) {echo $size_max;} ?>" type="text" id="size_max" class="span12 small" placeholder="<?php echo $text_max; ?>">
						</div>
					</div>
				</div>
				<!-- /.controls -->
			</div>
			<div class="type control-group">
				<label class="control-label" for="inputType"> <?php echo $text_tenure; ?> </label>
				<div class="controls">
					<select name="tenure" id="tenure" class="span12">
						<option value=""><?php echo $text_all_tenure; ?></option>
						<?php if(count($tenure) > 0) { ?>
						<?php foreach ($tenure as $item) { ?>
						<option value="<?php echo $item->Tenure_ID; ?>" <?php if($tenu == $item->Tenure_ID) {echo 'selected="selected"';} ?>><?php echo $item->Name; ?></option>
						<?php } ?>
						<?php } ?>
					</select>
				</div>
			<!-- /.controls -->
			</div>
			<!-- /.control-group -->
			<div class="keyword control-group">
				<input type="text" class="span12" placeholder="<?php //echo $text_keyword_of_properties; ?>" id="keyword" name="keyword" value="<?php echo $keyword; ?>">
			</div>
			<div class="control-group">
				<a href="<?php echo base_url(); ?>advancedsearch" style="color: #FFFFFF; font-size: 16px;"><?php echo $text_advanced_search_properties; ?></a>
			</div>
			<?php } ?>
			<!-- /.control-group -->
			<div class="form-actions">
				<input type="submit" value="Filter now!" class="btn btn-primary btn-large">
			</div>
			<!-- /.form-actions -->
		</form>
	</div>
	<!-- /.content -->
</div>
<!-- /.property-filter -->
